
/**		
 * 
 *	uk.co.lmfm.guppy.view.components.project.ProjectConfigPanel
 *	
 *	@version 1.00 | Jan 22, 2010
 *	@author Justin Windle
 *  
 **/
 
package uk.co.lmfm.guppy.view.components.project 
{
	import flash.events.Event;

	import uk.co.lmfm.guppy.view.components.core.AbstractView;
	import uk.co.lmfm.guppy.view.components.core.IViewComponent;

	/**
	 * ProjectConfigPanel
	 */
	public class ProjectUIPanel extends AbstractView implements IViewComponent 
	{
		//	----------------------------------------------------------------
		//	PROTECTED MEMBERS
		//	----------------------------------------------------------------

		protected var _height : Number = 0;

		//	----------------------------------------------------------------
		//	CONSTRUCTOR
		//	----------------------------------------------------------------

		public function ProjectUIPanel()
		{
			super();
		}

		//	----------------------------------------------------------------
		//	PROTECTED METHODS
		//	----------------------------------------------------------------

		override protected function resize() : void
		{
			super.resize();
			addEventListener(Event.ENTER_FRAME, onEnterFrame);
		}

		private function onEnterFrame(event : Event) : void
		{
			graphics.clear();
			graphics.lineStyle(0, 0xCCCCCC);
			graphics.moveTo(0, height);
			graphics.lineTo(stage.stageWidth, height);
			
			removeEventListener(Event.ENTER_FRAME, onEnterFrame);
		}

		//	----------------------------------------------------------------
		//	PUBLIC ACCESSORS
		//	----------------------------------------------------------------

		override public function get height() : Number
		{
			return _height;
		}

		override public function set height(value : Number) : void
		{
			_height = value;
		}
	}
}
